////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//		File Name		:		CCityLevelState.h
//
//		Author			:		Kevin Jordan
//
//		Purpose			:		A header for all functions and members of the Farm state
//
//		Dates			:		Written( March 5, 2011 ) by Kevin Jordan		LastUpdate( March 5, 2011  ) by Kevin Jordan 
//	
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "CCityLevelState.h"
#include "CMainMenuState.h"
#include "SGD Wrappers/CSGD_Direct3D.h"
#include "SGD Wrappers/CSGD_DirectInput.h"
#include "SGD Wrappers/CSGD_TextureManager.h"
#include "VIN_EventSystem.h"
#include "VIN_ObjectManager.h"
#include "CSaveOrLoadState.h"
#include "CJCEvent.h"
#include "CGame.h"
#include "CEnemy.h"
#include "CParticle.h"
#include "CPowerUp.h"
#include "CTestingLevelState.h"
#include "CGamePlayState.h"
#include "CHubState.h"


CCityLevelState::CCityLevelState()
{

	//pCatherine = NULL;


}


CCityLevelState::~CCityLevelState()
{







}



void CCityLevelState::Enter()
{

	/*pCatherine = CatherineAIState::GetInstance();
	pCatherine->SetHP(100);
	pCatherine->SetHeight(96);
	pCatherine->SetWidth(48);
	pCatherine->SetPosX(600);
	pCatherine->SetPosY(400);*/


}

void CCityLevelState::Exit()
{

	/*if( pCatherine )
	{	
	CatherineAIState::GetInstance()->ReleasePointers();
	}*/




}


CCityLevelState* CCityLevelState::GetInstance()
{


	static CCityLevelState instance;
	return &instance;


}


void CCityLevelState::Render()
{

	CSGD_Direct3D* pD3D = CSGD_Direct3D::GetInstance();
	pD3D->Clear(255,0,0);
	pD3D->DrawText("CITYLEVEL STATE", 400,150,0,0,0);
	//pCatherine->Render();
}



void CCityLevelState::Update(float fElapsedTime)
{




	//pCatherine->Update(fElapsedTime);
}


bool CCityLevelState::Input()
{

	CGame* pGameState = CGame::GetInstance();
	CSGD_DirectInput* pDI = CSGD_DirectInput::GetInstance();

	if( pDI->KeyPressed(DIK_ESCAPE) || CSGD_DirectInput::GetInstance()->JoystickButtonPressed(3) )
		pGameState->ChangeState( CHubState::GetInstance() );


	return true;
}


void CCityLevelState::HandleEvent(CEvent* pEvent)
{
	if( pEvent->GetEventID() == "DynTrig" )
	{
		if( pEvent->GetParam() == this )
			CGamePlayState::GetInstance()->SetTrigger(true);
	}
}